1. Field of the Invention
The present invention generally relates to a method and an apparatus for motion recognition, and more particularly, to a method and an apparatus for providing a customized motion library supporting recognition of motion patterns.
2. Description of Related Art
Nowadays, Virtual Reality Motion Sensing (VRMS) technique has become a mainstream in the game field. Through the detection of motion sensors disposed on a game controller, the motion or gestures performed by the user, even the positions or angles of the user can be precisely recognized. The recognition result is further applied to game control, thus providing users with reality to interact with the game, namely, a somatosensory game.
To support the recognition of complex motion, various motion sensors including a G-sensor, a gyro sensor, and a magnetic sensor are adopted to respectively detect the acceleration, angular velocity, and direction of a movement of the device. The parameters generated by the motion sensors are referred to a previously defined motion library, so as to recognize the motion performed by the user.
For example, FIG. 1 is a schematic diagram illustrating a conventional method for recognizing user motion in a somatosensory game. Referring to FIG. 1, a game developer usually takes use of ordinary motion applications (APIs) (step S110), such as sensor data GetSensorData( ) Euler angle GetEulerAngle( ) rotation matrix GetRotMatrix( ) quaternion output GETQuat( ) gravity output GetGravity( ) and linear acceleration output GetLinearAcc( ) to recognize the motion performed by the user. Whenever a motion is performed on a device, a plurality of parameters are generated by the motion sensors of the device and input to a recognition engine 100 for calculation (step S120). Finally, a motion of a forehand smash is recognized according to the output of the motion applications (step S130) and a recognition result indicating the forehand smash is output to execute a corresponding game operation (step S140).
However, each of the motion applications may involve in complicated mathematical calculation. To deal with the recognition of various motion performed by the user, plenty of APIs have to be used and complicated calculation has to be carried out, which expends large sum of system resource and consumes plenty of time. Further, the motion patterns to be recognized have to be defined in advance by the manufacture and cannot be changed by the user, which is inconvenient for the user.